<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class ModifyConfigOtherTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('config_other', function (Blueprint $table) {
            $table->dropColumn('config_template_id');
            $table->string('name')->default('')->comment('配置标识');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('config_other', function (Blueprint $table) {
            $table->dropColumn('name');
            $table->unsignedInteger('config_template_id')->comment('配置id');
        });
    }
}
